package in.unlocker.apps.unlock.model.registration;


import static javax.persistence.GenerationType.IDENTITY;
import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

import org.hibernate.annotations.NamedQuery;


//@NamedQuery(name = User.FIND_BY_USERNAME, query = "select user from User login where user.emailId= :emailId")

@Entity
@Table(name = "user_master", catalog = "unlocker")
public class User implements Serializable
{
//	public static final String FIND_BY_USERNAME = "User.findByUsername";
	private Long id;
	private String userName;
	private String emailId;
	private String password;
	private String phoneNumber;
	private String gender;
	private Date dateOfBirth;
	private String pinCode;
	private byte[] profileImage;
	

	
	/**
	 * @return the id
	 */
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Long getId()
	{
		return id;
	}


	/**
	 * @param id the id to set
	 */
	public void setId(Long id)
	{
		this.id = id;
	}
	

	@Column(name = "email_id")
	public String getEmailId()
	{
		return emailId;
	}


	/**
	 * @param emailId the emailId to set
	 */
	public void setEmailId(String emailId)
	{
		this.emailId = emailId;
	}

}
